<!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org" th:replace="~{modules/layout :: html(title = '归档', content = ~{::content})}">
<th:block th:fragment="content">
  <div id="content">
    <section class="archives-wrap" th:each="archives, status : ${archives.items}">
      <input class="hidden-input" type="checkbox" name="expand">
      <th:block th:each="archive : ${archives}">
        <label class="year" th:text="${archive.year}|"></label>
        <div class="archives">
          <th:block th:each="month : ${archive.months}">
            <article class="archive-article archive-type-post" th:each="post : ${month.posts}">
              <div class="archive-article-inner">
                <header class="archive-article-header">
                  <time class="time" 
                  itemprop="datePublished"
                  th:datetime="${#temporals.format(post.spec.publishTime, 'yyyy-MM-dd')}"
                  th:text="${#temporals.format(post.spec.publishTime, 'MM-dd')}"
                  ></time>
                  <h2 class="archive-article-title" itemprop="name">
                    <a th:href="${post.status.permalink}" th:text="${post.spec.title}"></a>
                  </h2>
                </header>
              </div>
            </article>
          </th:block>
        </div>
      </th:block>
    </section>
    <nav class="page-nav">
      <a class="extend prev" th:if="${archives.hasPrevious()}" rel="prev" th:href="@{${archives.prevUrl}}">« Prev</a>
      <span class="page-number" th:with="totalPage=${archives.totalPages}"
        th:text="${archives.page} + '  /  ' + ${totalPage}">
      </span>
      <a class="extend next" th:if="${archives.hasNext()}" rel="next" th:href="@{${archives.nextUrl}}">Next »</a>
    </nav>
  </div>
</th:block>

</html>